import React, {Component} from "react";
import {inject, observer} from "mobx-react";
import SelectActivityType from "./SelectActivityType";
import ActivityList from "./ActivityList/index";

@inject("activityStore")
@observer
class GetActivity extends Component {
    render() {
        const type = this.props.activityStore.activityType;
        return (
            <div>
                {type == -1 ?
                    (<SelectActivityType activityStore={this.props.activityStore}/>)
                    :
                    (<ActivityList activityStore={this.props.activityStore}/>)}
            </div>
        );
    };
}

export default GetActivity;
